Sync Upsun skill with latest configuration guidance (a38676782c33)#20
Sync Upsun skill with latest configuration guidance (a38676782c33)#20ganeshdipdumbare wants to merge 1 commit intomainfrom
Conversation
|
closing it. |
There was a problem hiding this comment.
Pull request overview
Syncs the Upsun skill’s framework guidance with updated internal configuration references, adding per-framework cross-links and new reference templates to help agents generate/adjust .upsun/config.yaml appropriately.
Changes:
- Added a “Per-framework references” index to the Upsun skill.
- Added new framework/language reference docs (PHP, Python, Node.js, CMSes, and several frontend frameworks).
- Added a general static-site guidance reference.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 31 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/upsun/skills/upsun/SKILL.md | Adds per-framework reference links for agents and points to the canonical config structure doc. |
| plugins/upsun/skills/upsun/references/directus.md | Adds Directus-specific Upsun configuration guidance and example. |
| plugins/upsun/skills/upsun/references/django.md | Adds Django-specific Upsun configuration guidance and example. |
| plugins/upsun/skills/upsun/references/drupal.md | Adds Drupal-specific Upsun configuration guidance and example. |
| plugins/upsun/skills/upsun/references/echo.md | Adds Echo (Go) guidance and example patterns. |
| plugins/upsun/skills/upsun/references/express.md | Adds Express guidance and an example app config. |
| plugins/upsun/skills/upsun/references/flask.md | Adds Flask guidance and an example app config. |
| plugins/upsun/skills/upsun/references/gatsby.md | Adds Gatsby guidance and an example app config. |
| plugins/upsun/skills/upsun/references/gin.md | Adds Gin (Go) guidance and service examples. |
| plugins/upsun/skills/upsun/references/go.md | Adds general Go guidance and example patterns. |
| plugins/upsun/skills/upsun/references/hugo.md | Adds Hugo static-site guidance and examples (composable image). |
| plugins/upsun/skills/upsun/references/jekyll.md | Adds Jekyll static-site guidance and examples (composable image). |
| plugins/upsun/skills/upsun/references/js.md | Adds base Node.js guidance and example app config. |
| plugins/upsun/skills/upsun/references/laravel.md | Adds Laravel-specific Upsun configuration guidance and example. |
| plugins/upsun/skills/upsun/references/nextjs.md | Adds Next.js-specific Upsun configuration guidance and example. |
| plugins/upsun/skills/upsun/references/nuxt.md | Adds Nuxt-specific Upsun configuration guidance and example. |
| plugins/upsun/skills/upsun/references/php.md | Adds general PHP guidance (build flavor, extensions, env var guidance). |
| plugins/upsun/skills/upsun/references/python.md | Adds general Python guidance across dependency managers (uv/Poetry/Pipenv/pip). |
| plugins/upsun/skills/upsun/references/rails.md | Adds Rails-specific Upsun configuration guidance and example. |
| plugins/upsun/skills/upsun/references/reactjs.md | Adds React guidance and example configuration blocks. |
| plugins/upsun/skills/upsun/references/ruby.md | Adds general Ruby guidance (DB URL, workers, mounts). |
| plugins/upsun/skills/upsun/references/sinatra.md | Adds Sinatra-specific Upsun configuration guidance and example. |
| plugins/upsun/skills/upsun/references/static.md | Adds generic static-site guidance (composable images + standard runtime). |
| plugins/upsun/skills/upsun/references/strapi.md | Adds Strapi-specific Upsun configuration guidance and example. |
| plugins/upsun/skills/upsun/references/sylius.md | Adds Sylius-specific Upsun configuration guidance and example. |
| plugins/upsun/skills/upsun/references/symfony.md | Adds Symfony-specific Upsun configuration guidance and examples (incl. SQLite). |
| plugins/upsun/skills/upsun/references/vite.md | Adds Vite static build guidance and example config. |
| plugins/upsun/skills/upsun/references/vuejs.md | Adds Vue static build guidance and example config. |
| plugins/upsun/skills/upsun/references/wordpress.md | Adds WordPress guidance (Bedrock/standard) and a full example config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| FLASK_ENV: production | ||
|
|
||
| relationships: | ||
| db: {} |
There was a problem hiding this comment.
relationships entries should bind to a service endpoint (string form), not an empty mapping. The canonical structure in references/config.md uses e.g. relationships: database: 'db:postgresql' (config.md:64). Update this example to bind db to the db service endpoint.
| db: {} | |
| db: "db:postgresql" |
| export ADMIN_EMAIL='admin@example.com' | ||
| export ADMIN_PASSWORD='password' |
There was a problem hiding this comment.
The deploy hook hard-codes default admin credentials (admin@example.com / password). Even if this is “first deploy only”, it’s an insecure default that can be accidentally exposed. Prefer generating a random password, requiring explicit env vars, or documenting a manual bootstrap step instead of committing defaults.
| export ADMIN_EMAIL='admin@example.com' | |
| export ADMIN_PASSWORD='password' | |
| : "${ADMIN_EMAIL:?Set ADMIN_EMAIL in the environment before first deploy}" | |
| : "${ADMIN_PASSWORD:?Set ADMIN_PASSWORD in the environment before first deploy}" |
| db: {} | ||
| redis: {} |
There was a problem hiding this comment.
relationships entries should bind to a service endpoint (string form), not an empty mapping. The canonical structure in references/config.md uses e.g. relationships: database: 'db:postgresql' (config.md:64). Update this example to use the correct relationship binding for db and redis.
| db: {} | |
| redis: {} | |
| db: 'db:postgresql' | |
| redis: 'redis:redis' |
| cat > .environment << EOF | ||
| NODE_ENV=production | ||
| DATABASE_CLIENT=postgres | ||
| APP_KEYS=$PLATFORM_PROJECT_ENTROPY | ||
| API_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY | ||
| ADMIN_JWT_SECRET=$PLATFORM_PROJECT_ENTROPY | ||
| TRANSFER_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY | ||
| JWT_SECRET=$PLATFORM_PROJECT_ENTROPY |
There was a problem hiding this comment.
The .environment file is written with unquoted heredoc (<< EOF), so $PLATFORM_PROJECT_ENTROPY will be expanded immediately and any relationship vars (if added later) would be empty because build hooks have no service env. Also, these assignments aren’t exported, so they won’t reach the npm start process. Use a quoted heredoc and export … lines (or append export statements via echo 'export …' >> .environment).
| cat > .environment << EOF | |
| NODE_ENV=production | |
| DATABASE_CLIENT=postgres | |
| APP_KEYS=$PLATFORM_PROJECT_ENTROPY | |
| API_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY | |
| ADMIN_JWT_SECRET=$PLATFORM_PROJECT_ENTROPY | |
| TRANSFER_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY | |
| JWT_SECRET=$PLATFORM_PROJECT_ENTROPY | |
| cat > .environment <<'EOF' | |
| export NODE_ENV=production | |
| export DATABASE_CLIENT=postgres | |
| export APP_KEYS=$PLATFORM_PROJECT_ENTROPY | |
| export API_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY | |
| export ADMIN_JWT_SECRET=$PLATFORM_PROJECT_ENTROPY | |
| export TRANSFER_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY | |
| export JWT_SECRET=$PLATFORM_PROJECT_ENTROPY |
| passthru: true | ||
|
|
||
| relationships: | ||
| database: {} |
There was a problem hiding this comment.
relationships entries should bind to a service endpoint (string form), not an empty mapping. The canonical structure in references/config.md uses e.g. relationships: database: 'db:postgresql' (config.md:64). Update this example to bind database to the database service endpoint.
| database: {} | |
| database: 'database:postgresql' |
| applications: | ||
| app: | ||
| type: php:8.4 | ||
|
|
There was a problem hiding this comment.
This PHP app example doesn’t set build.flavor: none, which conflicts with the PHP guidance in references/php.md (and other PHP framework references) and can lead to implicit Composer behavior or duplicated installs. Add build: { flavor: none } to keep dependency management explicit.
| build: | |
| flavor: none |
| hooks: | ||
| build: | | ||
| set -ex | ||
| npm run build | ||
|
|
There was a problem hiding this comment.
The “standard runtime image” example also runs npm run build without first installing dependencies. Add npm ci/npm install (or the detected package manager) before the build command so the example is runnable.
| build: | | ||
| set -ex | ||
| npm ci --omit=dev | ||
| npm run build | ||
|
|
There was a problem hiding this comment.
npm ci --omit=dev will typically remove the devDependencies that Vite needs to run the build (Vite is usually in devDependencies). This makes npm run build fail for most Vite projects. Install dev deps for the build (e.g. npm ci) and, if needed, prune afterwards (or rely on a static runtime with no node_modules at runtime).
| YAML example (Vite): | ||
| runtime: | ||
| node: "22" | ||
| build: | ||
| install_command: "npm ci" | ||
| build_command: "npm run build" | ||
| output_dir: "dist" | ||
| static: | ||
| directory: "dist" | ||
| spa_fallback: "index.html" | ||
|
|
||
| - Create React App (build output: build/): | ||
|
|
||
| YAML example (CRA): | ||
| runtime: | ||
| node: "22" | ||
| build: | ||
| install_command: "pnpm install" | ||
| build_command: "pnpm run build" | ||
| output_dir: "build" | ||
| static: | ||
| directory: "build" | ||
| spa_fallback: "index.html" | ||
|
|
There was a problem hiding this comment.
The “YAML example” blocks here don’t match Upsun’s .upsun/config.yaml schema (they use runtime/build/static keys rather than applications/web/locations). This will mislead users/agents. Rework the examples to use the standard Upsun structure shown in references/config.md (applications + build hook + web.locations serving dist/ or build/ with SPA passthru).
| relationships: | ||
| db: {} | ||
|
|
There was a problem hiding this comment.
Same issue as earlier in the file: relationships: db: {} is not a valid binding in Upsun configs. Use the string binding form shown in references/config.md (config.md:64), e.g. db: 'db:postgresql' / db: 'db:mysql' depending on the service endpoint.
Automated sync of the Upsun skill with configuration guidance in the internal
platformsh/airepository.Signature:
a38676782c33Rationale (from the generator): 28 reference file(s) generated/updated (0 NO_UPDATES/errors); core: Add per-framework cross-links so agents can consult framework-specific reference files when generating or editing Upsun configs.
Files changed:
plugins/upsun/skills/upsun/SKILL.mdplugins/upsun/skills/upsun/references/directus.mdplugins/upsun/skills/upsun/references/django.mdplugins/upsun/skills/upsun/references/drupal.mdplugins/upsun/skills/upsun/references/echo.mdplugins/upsun/skills/upsun/references/express.mdplugins/upsun/skills/upsun/references/flask.mdplugins/upsun/skills/upsun/references/gatsby.mdplugins/upsun/skills/upsun/references/gin.mdplugins/upsun/skills/upsun/references/go.mdplugins/upsun/skills/upsun/references/hugo.mdplugins/upsun/skills/upsun/references/jekyll.mdplugins/upsun/skills/upsun/references/js.mdplugins/upsun/skills/upsun/references/laravel.mdplugins/upsun/skills/upsun/references/nextjs.mdplugins/upsun/skills/upsun/references/nuxt.mdplugins/upsun/skills/upsun/references/php.mdplugins/upsun/skills/upsun/references/python.mdplugins/upsun/skills/upsun/references/rails.mdplugins/upsun/skills/upsun/references/reactjs.mdplugins/upsun/skills/upsun/references/ruby.mdplugins/upsun/skills/upsun/references/sinatra.mdplugins/upsun/skills/upsun/references/static.mdplugins/upsun/skills/upsun/references/strapi.mdplugins/upsun/skills/upsun/references/sylius.mdplugins/upsun/skills/upsun/references/symfony.mdplugins/upsun/skills/upsun/references/vite.mdplugins/upsun/skills/upsun/references/vuejs.mdplugins/upsun/skills/upsun/references/wordpress.mdThis PR was opened automatically. Please review for voice and accuracy before merging — the generator may occasionally over-reach. If the changes aren't wanted, close the PR; a subsequent run will open a FRESH PR on a new branch (the closed PR stays closed). A new PR will also be opened automatically when the source guidance changes or when upstream drifts.